package com.deuwise.system.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 *@author deuwise
 *@date 2018-11-09 17:12:43
 */
@Data
@EqualsAndHashCode(callSuper=true)
@TableName("sys_log")
public class LogDO extends Model<LogDO>  implements Serializable{

    /**id主键*/
    @ApiModelProperty("id主键")
    @TableField("id")
    @TableId
    private String id;

    /**用户id*/
    @ApiModelProperty("用户id")
    @TableField("user_id")
    private String userId;

    /**用户名称*/
    @ApiModelProperty("用户名称")
    @TableField("user_name")
    private String userName;

    /**用户操作*/
    @ApiModelProperty("用户操作")
    @TableField("operation")
    private String operation;

    /**响应时间*/
    @ApiModelProperty("响应时间")
    @TableField("time")
    private Integer time;

    /**请求方法*/
    @ApiModelProperty("请求方法")
    @TableField("method")
    private String method;

    /**传递参数*/
    @ApiModelProperty("传递参数")
    @TableField("params")
    private String params;

    /**ip地址*/
    @ApiModelProperty("ip地址")
    @TableField("ip")
    private String ip;

    /**创建时间*/
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty("状态 0错误，1正常，2登录")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("请求url")
    private  String url;

    @ApiModelProperty("错误信息")
    @TableField("exception")
    private  String exception;

   @Override
    protected Serializable pkVal() {
        return id;
    }
}